package mrusanov.util

import javax.swing.JLabel
import mrusanov.localization.Localization
import java.awt.Container

object SwingUtil {
  def addLabel(cont:Container, msgKey:String, value:Any) {
    val label = new JLabel(Localization(msgKey))
    val valueLabel = new JLabel(value.toString)
    cont.add(label)
    cont.add(valueLabel, "wrap")
  }

  def addSingleLabel(cont:Container, msgKey:String) {
    val label = new JLabel(Localization(msgKey))
    cont.add(label, "span 2, align center, wrap")
  }
}
